let express = require('express');
let app = express();
// npm install ws
let WebSocket = require('ws');
let wss = new WebSocket.Server({port:8000});
wss.on('connection',function(ws){
    ws.on('message',function(data){
        console.log('客户端',data)
        ws.send('服务端')
    })
})

